<template>
  <div class="mod-config">
    <el-card>
      <el-form :inline="true" :model="dataForm" ref="tasktransportsearchform" @keyup.enter.native="getDatatasktransportList()">
        <el-row>
          <el-form-item class="el-col-6" prop="id" label="任务编号">
            <el-input v-model="dataForm.id" placeholder="任务编号" clearable></el-input>
          </el-form-item>
          <el-form-item class="el-col-6" prop="drivername" label="司机名称">
            <el-input v-model="dataForm.drivername" placeholder="司机名称" clearable></el-input>
          </el-form-item>
          <el-form-item class="el-col-6" prop="status" label="任务状态">
            <el-select v-model="dataForm.status" placeholder="任务状态">
              <el-option label="请选择" value="0"></el-option>
              <el-option label="待发车" value="1"></el-option>
              <el-option label="在途中" value="2"></el-option>
              <el-option label="已到达" value="3"></el-option>
            </el-select>
          </el-form-item>
        </el-row>
        <el-row>
          <el-form-item>
            <el-button class="el-button--primary" @click="getDatatasktransportList()">查询</el-button>
            <el-button class="el-button--warning" @click="tasktransportresetdateform('tasktransportsearchform')">重置</el-button>
          </el-form-item>
        </el-row>
      </el-form>
    </el-card>

    <el-card>
      <el-table
      :data="datatasktransportList"
      border
      v-loading="datatasktransportListLoading"
      @selection-change="selectionChangeHandle"
      style="width: 100%;">
      <el-table-column
        type="selection"
        header-align="center"
        align="center"
        width="50">
      </el-table-column>
      <el-table-column
        prop="id"
        header-align="center"
        align="center"
        label="运输任务编号">
      </el-table-column>
      <el-table-column
        prop="license"
        header-align="center"
        align="center"
        label="车牌号码">
      </el-table-column>
      <el-table-column
        prop="diaoduagency"
        header-align="center"
        align="center"
        label="调度机构">
      </el-table-column>
      <el-table-column
        prop="startagencyname"
        header-align="center"
        align="center"
        width="150"
        label="起始地">
      </el-table-column>
      <el-table-column
        prop="endagencyname"
        header-align="center"
        align="center"
        width="150"
        label="目的地">
      </el-table-column>
      <el-table-column
        prop="drivername"
        header-align="center"
        align="center"
        width="150"
        label="司机">
      </el-table-column>
      <el-table-column
        prop="status"
        header-align="center"
        align="center"
        label="运输任务状态">
        <tmplate slot-scope="scope">
          <span>{{ scope.row.status == 1 ? '待发车' : scope.row.status == 2 ? '在途中' : '已到达' }}</span>
        </tmplate>
      </el-table-column>
      <el-table-column
        prop="loadingStatus"
        header-align="center"
        align="center"
        label="车辆满载状态">
        <tmplate slot-scope="scope">
          <span>{{ scope.row.loadingStatus == 1 ? '半载' : scope.row.loadingStatus == 2 ? '满载' : '空载' }}</span>
        </tmplate>
      </el-table-column>
      <el-table-column
        prop="planPickUpGoodsTime"
        header-align="center"
        align="center"
        width="160"
        label="计划提货时间">
      </el-table-column>
      <el-table-column
        prop="actualPickUpGoodsTime"
        header-align="center"
        align="center"
        width="180"
        label="实际提货时间">
      </el-table-column>
      <el-table-column
        prop="planDepartureTime"
        header-align="center"
        align="center"
        width="180"
        label="计划发车时间">
      </el-table-column>
      <el-table-column
        prop="actualDepartureTime"
        header-align="center"
        align="center"
        width="180"
        label="实际发车时间">
      </el-table-column>
      <el-table-column
        fixed="right"
        header-align="center"
        align="center"
        width="180"
        label="操作">
        <template slot-scope="scope">
          <el-button type="text" size="small" @click="gettasktransportdetails(scope.row.id)">查看运输任务详情</el-button>
        </template>
      </el-table-column>
      </el-table>
      <el-pagination
        @size-change="sizeChangeHandle"
        @current-change="currentChangeHandle"
        :current-page="pageIndex"
        :page-sizes="[10, 20, 50, 100]"
        :page-size="pageSize"
        :total="totalPage"
        layout="total, sizes, prev, pager, next, jumper">
      </el-pagination>
    </el-card>

    <el-dialog custom-class="truckdetailswidth" title="查看详情" :visible.sync="tasktransportdetailsVisible" :close-on-click-modal="false">

      <el-tabs @tab-click="handleClick" :tab-position="tabPosition" type="border-card">
        <el-tab-pane label="基本信息">
          <el-card>
            <h3>基本信息</h3>
            <el-form label-width="100px">
              <el-row>
                <el-form-item class="el-col-7" prop="id" label="运输任务编号">
                  <el-input disabled v-model="basicform.id" placeholder="运输任务编号" clearable></el-input>
                </el-form-item>
                <el-form-item class="el-col-7 el-col-offset-1" prop="license" label="车牌号码">
                  <el-input size="12px" disabled id="license" v-model="basicform.license" placeholder="车牌号码" clearable></el-input>
                </el-form-item>
              </el-row>
              <el-row>
                <el-form-item class="el-col-7" prop="diaoduagency" label="调度机构">
                  <el-input size="12px" disabled id="diaoduagency" v-model="basicform.diaoduagency" placeholder="调度机构" clearable></el-input>
                </el-form-item>
                <el-form-item class="el-col-7 el-col-offset-1" prop="startagencyname" label="起始机构">
                  <el-input size="12px" disabled id="startagencyname" v-model="basicform.startagencyname" placeholder="起始机构" clearable></el-input>
                </el-form-item>
              </el-row>
              <el-row>
                <el-form-item class="el-col-7" prop="endagencyname" label="目的机构">
                  <el-input size="12px" disabled id="endagencyname" v-model="basicform.endagencyname" placeholder="目的机构" clearable></el-input>
                </el-form-item>
              </el-row>
            </el-form>
          </el-card>
        </el-tab-pane>

        <el-tab-pane label="任务轨迹">
          <el-card>
            <h3>任务轨迹</h3>
            <el-form label-width="100px">
              <el-row>
                <el-form-item class="el-col-7 el-col-offset-1" prop="license" label="车牌号码">
                  <el-input size="12px" disabled id="tlicense" v-model="taskgjform.license" placeholder="车牌号码" clearable></el-input>
                </el-form-item>
                <el-form-item class="el-col-7 el-col-offset-1" prop="drivername" label="司机">
                  <el-input size="12px" disabled id="drivername" v-model="taskgjform.drivername" placeholder="司机" clearable></el-input>
                </el-form-item>
              </el-row>
              <el-row>
                <el-form-item class="el-col-7 el-col-offset-1" prop="planDepartureTime" label="计划发车时间">
                  <el-input size="12px" disabled id="planDepartureTime" v-model="taskgjform.planDepartureTime" placeholder="计划发车时间" clearable></el-input>
                </el-form-item>
                <el-form-item class="el-col-7 el-col-offset-1" prop="actualDepartureTime" label="实际发车时间">
                  <el-input size="12px" disabled id="actualDepartureTime" v-model="taskgjform.actualDepartureTime" placeholder="实际发车时间" clearable></el-input>
                </el-form-item>
              </el-row>
              <el-row>
                <el-form-item class="el-col-7 el-col-offset-1" prop="planArrivalTime" label="计划到达时间">
                  <el-input size="12px" disabled id="planArrivalTime" v-model="taskgjform.planArrivalTime" placeholder="计划到达时间" clearable></el-input>
                </el-form-item>
                <el-form-item class="el-col-7 el-col-offset-1" prop="actualArrivalTime" label="实际到达时间">
                  <el-input size="12px" disabled id="actualArrivalTime" v-model="taskgjform.actualArrivalTime" placeholder="实际到达时间" clearable>
                  </el-input>
                </el-form-item>
              </el-row>
            </el-form>
          </el-card>
        </el-tab-pane>

        <el-tab-pane label="运单详情">
          <el-card>
            <h3>运单详情</h3>
            <el-table
              :data="datatransportorderList"
              border
              v-loading="datatransportorderListLoading"
              style="width: 100%;">
              <el-table-column
                prop="id"
                header-align="center"
                align="center"
                label="运单编号">
              </el-table-column>
              <el-table-column
                prop="ordercreateTime"
                header-align="center"
                align="center"
                label="下单时间">
              </el-table-column>
              <el-table-column
                prop="sendername"
                header-align="center"
                align="center"
                label="发件人姓名">
              </el-table-column>
              <el-table-column
                prop="senderphone"
                header-align="center"
                align="center"
                label="发件人电话">
              </el-table-column>
              <el-table-column
                prop="senderaddress"
                header-align="center"
                align="center"
                label="发件人地址">
              </el-table-column>
              <el-table-column
                prop="quantity"
                header-align="center"
                align="center"
                label="数量">
              </el-table-column>
              <el-table-column
                fixed="right"
                header-align="center"
                align="center"
                width="150"
                label="操作">
                <template slot-scope="scope">
                  <el-button type="text" size="small" @click="getdetails(scope.row.id)">查看详情</el-button>
                </template>
              </el-table-column>
            </el-table>
          </el-card>
        </el-tab-pane>

      </el-tabs>


      <div slot="footer" class="dialog-footer">
        <el-button @click="tasktransportdetailsVisible = false">取消</el-button>
      </div>
    </el-dialog>

    <el-dialog custom-class="detailcustomwidth" title="运单详情" width="800" :close-on-click-modal="false"
               :visible.sync="transportVisible">
      <el-form ref="">
        <br>
        <el-card>
          <el-row>
            <el-form-item style="font-weight: bold" class="el-col-8" prop="orderId" label="订单编号：">
              <span style="color: gray;font-weight: normal" id="orderId"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" class="el-col-8" prop="id" label="运单编号：">
              <span style="color: gray;font-weight: normal" id="id"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="createTime" class="el-col-8" label="下单时间：">
              <span style="color: gray;font-weight: normal" id="createTime"></span>
            </el-form-item>
          </el-row>
          <el-row>
            <el-form-item style="font-weight: bold" prop="status" class="el-col-8" label="订单状态：">
              <span style="color: gray;font-weight: normal" id="status"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="estimatedArrivalTime" class="el-col-8" label="预计到达日期：">
              <span style="color: gray;font-weight: normal" id="estimatedArrivalTime"></span>
            </el-form-item>
          </el-row>
        </el-card>
        <br>
        <el-card>
          <div class="el-card__header" style="background-color: GhostWhite; margin-top: 0px;margin-left: 0px;margin-right: 0px">
            <div class="clearfix" style="background-color: GhostWhite  ;">
              <h3>基本信息</h3>
            </div>
          </div>
          <el-timeline><!--  icon="el-icon-map-location"    icon="el-icon-aim" -->
            <el-timeline-item timestamp="发货方" placement="top">
              <el-card>
                <el-form-item style="font-weight: bold" prop="senderName" class="el-col-10" label="发货方姓名：">
                  <span style="color: gray;font-weight: normal" id="senderName"></span>
                </el-form-item>
                <el-form-item style="font-weight: bold" prop="senderssqaddress" class="el-col-10" label="发货方地址：">
                  <span style="color: gray;font-weight: normal" id="senderssqaddress"></span>
                </el-form-item>
                <el-form-item style="font-weight: bold" prop="senderPhone" class="el-col-10" label="发货方电话：">
                  <span style="color: gray;font-weight: normal" id="senderPhone"></span>
                </el-form-item>
                <el-form-item style="font-weight: bold" prop="senderAddress" class="el-col-10" label="详细地址：">
                  <span style="color: gray;font-weight: normal" id="senderAddress"></span>
                </el-form-item>
              </el-card>
            </el-timeline-item>
            <el-timeline-item timestamp="收货方" placement="top">
              <el-card>
                <el-form-item style="font-weight: bold" prop="receiverName" class="el-col-10" label="发货方姓名：">
                  <span style="color: gray;font-weight: normal" id="receiverName"></span>
                </el-form-item>
                <el-form-item style="font-weight: bold" prop="receiverssqaddress" class="el-col-10" label="发货方地址：">
                  <span style="color: gray;font-weight: normal" id="receiverssqaddress"></span>
                </el-form-item>
                <el-form-item style="font-weight: bold" prop="receiverPhone" class="el-col-10" label="发货方电话：">
                  <span style="color: gray;font-weight: normal" id="receiverPhone"></span>
                </el-form-item>
                <el-form-item style="font-weight: bold" prop="receiverAddress" class="el-col-10" label="详细地址：">
                  <span style="color: gray;font-weight: normal" id="receiverAddress"></span>
                </el-form-item>
              </el-card>
              <el-row>
                <el-form-item style="font-weight: bold" prop="distance" align="left" class="el-col-8" label="距离：">
                  <span style="color: gray;font-weight: normal" id="distance"></span>
                </el-form-item>
                <el-form-item style="font-weight: bold" prop="senderaddress" class="el-col-8" label="地图：">
                  <span><a href="#">查看地图</a></span>
                </el-form-item>
              </el-row>
            </el-timeline-item>
          </el-timeline>
        </el-card>
        <br>
        <el-card>
          <div class="el-card__header" style="background-color: GhostWhite; margin-top: 0px;margin-left: 0px;margin-right: 0px">
            <div class="clearfix" style="background-color: GhostWhite  ;">
              <h3>费用信息</h3>
            </div>
          </div>
          <el-row>
            <el-form-item style="font-weight: bold" prop="amount" class="el-col-5" label="运费：">
              <span style="color: gray;font-weight: normal" id="amount"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="paymentMethod" class="el-col-5" label="支付方式：">
              <span style="color: gray;font-weight: normal" id="paymentMethod"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="paymentStatus" class="el-col-5" label="支付状态：">
              <span style="color: gray;font-weight: normal" id="paymentStatus"></span>
            </el-form-item>
          </el-row>
        </el-card>
        <br>
        <el-card>
          <div class="el-card__header" style="background-color: GhostWhite; margin-top: 0px;margin-left: 0px;margin-right: 0px">
            <div class="clearfix" style="background-color: GhostWhite;">
              <h3>货品信息</h3>
            </div>
          </div>
          <el-table
            :data="dataorderdetailsList"
            border
            v-loading="dataorderdetailsListLoading"
            style="width: 100%;color: black">
            <el-table-column
              prop="name"
              header-align="center"
              align="center"
              label="货品名称">
            </el-table-column>
            <el-table-column
              prop="quantity"
              header-align="center"
              align="center"
              label="货品数量">
            </el-table-column>
            <el-table-column
              prop="unit"
              header-align="center"
              align="center"
              label="货品单位">
            </el-table-column>
            <el-table-column
              prop="goodtype"
              header-align="center"
              align="center"
              label="货品类型">
              <tmplate slot-scope="scope">
                <span>{{ scope.row.status == 1 ? '待取件' : scope.row.status == 2 ? '已取件' : '' }}</span>
              </tmplate>
            </el-table-column>
            <el-table-column
              prop="weight"
              header-align="center"
              align="center"
              label="重量（千克）">
            </el-table-column>
            <el-table-column
              prop="volume"
              header-align="center"
              align="center"
              label="体积（方）">
            </el-table-column>
            <el-table-column
              prop="cargoValue"
              header-align="center"
              align="center"
              label="货值（元）">
            </el-table-column>
            <el-table-column
              prop="cargoBarcode"
              header-align="center"
              align="center"
              label="条形编码">
            </el-table-column>
            <el-table-column
              prop="remark"
              header-align="center"
              align="center"
              label="备注">
            </el-table-column>
          </el-table>
        </el-card>
        <br>
        <el-card>
          <div class="el-card__header" style="background-color: GhostWhite; margin-top: 0px;margin-left: 0px;margin-right: 0px">
            <div class="clearfix" style="background-color: GhostWhite;">
              <h3>取件信息</h3>
            </div>
          </div>
          <el-row>
            <el-form-item style="font-weight: bold" prop="qagencyId" class="el-col-6" label="所在网点：">
              <span style="color: gray;font-weight: normal" id="qagencyId"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="taskType" class="el-col-6" label="取件类型：">
              <span style="color: gray;font-weight: normal" id="taskType"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="qsstatus" class="el-col-6" label="作业状态：">
              <span style="color: gray;font-weight: normal" id="qstatus"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="qcourier" class="el-col-6" label="取件快递员：">
              <span style="color: gray;font-weight: normal" id="qcourier"></span>
            </el-form-item>
          </el-row>
          <el-row>
            <el-form-item style="font-weight: bold" prop="qcphone" class="el-col-6" label="快递员电话：">
              <span style="color: gray;font-weight: normal" id="qcphone"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="qestimatedStartTime" class="el-col-6" label="预计取件时间：">
              <span style="color: gray;font-weight: normal" id="qestimatedStartTime"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="qconfirmTime" class="el-col-6" label="取件完成时间：">
              <span style="color: gray;font-weight: normal" id="qconfirmTime"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="actualEndTime" class="el-col-6" label="实际完成时间：">
              <span style="color: gray;font-weight: normal" id="actualEndTime"></span>
            </el-form-item>
          </el-row>
        </el-card>
        <el-card>
          <div class="el-card__header" style="background-color: GhostWhite; margin-top: 0px;margin-left: 0px;margin-right: 0px">
            <div class="clearfix" style="background-color: GhostWhite;">
              <h3>派送信息</h3>
            </div>
          </div>
          <el-row>
            <el-form-item style="font-weight: bold" prop="pagencyId" class="el-col-6" label="所在网点：">
              <span style="color: gray;font-weight: normal" id="pagencyId"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="pstatus" class="el-col-6" label="作业状态：">
              <span style="color: gray;font-weight: normal" id="pstatus"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="pcourier" class="el-col-6" label="派件快递员：">
              <span style="color: gray;font-weight: normal" id="pcourier"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="pcphone" class="el-col-6" label="快递员电话：">
              <span style="color: gray;font-weight: normal" id="pcphone"></span>
            </el-form-item>
          </el-row>
          <el-row>
            <el-form-item style="font-weight: bold" prop="pestimatedStartTime" class="el-col-6" label="预计派送时间：">
              <span style="color: gray;font-weight: normal" id="pestimatedStartTime"></span>
            </el-form-item>
            <el-form-item style="font-weight: bold" prop="pconfirmTime" class="el-col-6" label="派件完成时间：">
              <span style="color: gray;font-weight: normal" id="pconfirmTime"></span>
            </el-form-item>
          </el-row>
        </el-card>
      </el-form>

      <div slot="footer" class="dialog-footer">
        <el-button @click="transportVisible = false">取消</el-button>
      </div>
    </el-dialog>


  </div>
</template>

<style>
.truckdetailswidth{
  width: 80%;
  height: 80%;
}
.detailcustomwidth {
  width: 100%;
}
</style>

<script src="src/api/work.js"></script>
<script>
import {getTaskTransportInfo, getTaskTransportList, getTransportOrderInfo} from '../../../api/work'

export default {
  data() {
    return {
      dataForm: {
        id: '',
        drivername: '',
        status: '',
      },
      basicform: {
        id: '',
        license: '',
        diaoduagency: '',
        startagencyname: '',
        endagencyname: '',
      },
      taskgjform: {
        license: '',
        drivername: '',
        planDepartureTime: '',
        actualDepartureTime: '',
        planArrivalTime: '',
        actualArrivalTime: '',
      },
      datatransportorderList:[],
      datatasktransportList: [],
      pageIndex: 1,
      pageSize: 10,
      totalPage: null,
      datatransportorderListLoading: false,
      datatasktransportListLoading: false,
      datatasktransportListSelections: [],
      transportVisible: false,
      tasktransportdetailsVisible: false,
      tabPosition: "left",
      dataorderdetailsList: [],
      dataorderdetailsListLoading: false,

    }
  },
  mounted() {
    this.getDatatasktransportList()
  },
  methods: {
    tasktransportresetdateform(tasktransportsearchform) {
      this.$refs['tasktransportsearchform'].resetFields();
      this.getDatatasktransportList();
    },
    // 获取数据列表
    getDatatasktransportList() {
      let res = JSON.stringify(this.dataForm)
      this.datatasktransportListLoading = true
      let params = {
        'pageno': this.pageIndex,
        'pagesize': this.pageSize,
        'id': this.dataForm.id,
        'drivername': this.dataForm.drivername,
        'status': this.dataForm.status,
      }
      getTaskTransportList(params).then(({data}) => {
        if (data && data.code == 0) {
          this.datatasktransportList = data.page.rows
          this.totalPage = data.page.total
        } else {
          this.datatasktransportList = []
          this.totalPage = 0
        }
        this.datatasktransportListLoading = false
      })
    },
    // 每页数
    sizeChangeHandle(val) {
      this.pageSize = val
      this.pageIndex = 1
      this.getDatatasktransportList()
    },
    // 当前页
    currentChangeHandle(val) {
      this.pageIndex = val
      this.getDatatasktransportList()
    },
    // 多选
    selectionChangeHandle(val) {
      this.datatasktransportListSelections = val
    },
    handleClick(tab, event) {
      console.log(tab, event);
    },

    gettasktransportdetails(id){
      getTaskTransportInfo(id).then(({data}) => {
        this.basicform.id = data.taskTransport.id
        this.basicform.license = data.taskTransport.license
        this.basicform.diaoduagency = data.taskTransport.diaoduagency
        this.basicform.startagencyname = data.taskTransport.startagencyname
        this.basicform.endagencyname = data.taskTransport.endagencyname

        this.taskgjform.license = data.taskTransport.license
        this.taskgjform.drivername = data.taskTransport.drivername
        this.taskgjform.planDepartureTime = data.taskTransport.planDepartureTime
        this.taskgjform.actualDepartureTime = data.taskTransport.actualDepartureTime
        this.taskgjform.planArrivalTime = data.taskTransport.planArrivalTime
        this.taskgjform.actualArrivalTime = data.taskTransport.actualArrivalTime

        this.datatransportorderList = data.transportorder

      })
      this.tasktransportdetailsVisible = true
    },

    getdetails(oid) {
      getTransportOrderInfo(oid).then(res => {
        console.log(res.data.ordercargo)
        console.log(res.data.order)
        this.dataorderdetailsList = res.data.ordercargo
        document.getElementById('orderId').innerHTML = res.data.transportOrder.orderId
        document.getElementById('id').innerHTML = res.data.transportOrder.id
        document.getElementById('createTime').innerHTML = res.data.order.createTime
        document.getElementById('status').innerHTML = res.data.order.status == 1 ? '待取件' : res.data.order.status == 2 ? '已取件' : res.data.order.status == 3 ? '网点入库' : res.data.order.status == 4 ? '待装车' : res.data.order.status == 5 ? '运输中' : res.data.order.status == 6 ? '网点出库' : res.data.order.status == 7 ? '待派送' : res.data.order.status == 8 ? '派送中' : res.data.order.status == 9 ? '已签收' : res.data.order.status == 10 ? '拒收' : res.data.order.status == 11 ? '已取消' : '全部'
        document.getElementById('estimatedArrivalTime').innerHTML = res.data.order.estimatedArrivalTime
        document.getElementById('senderName').innerHTML = res.data.order.senderName
        document.getElementById('senderssqaddress').innerHTML = res.data.order.senderssqaddress
        document.getElementById('senderPhone').innerHTML = res.data.order.senderPhone
        document.getElementById('senderAddress').innerHTML = res.data.order.senderAddress
        document.getElementById('receiverName').innerHTML = res.data.order.receiverName
        document.getElementById('receiverssqaddress').innerHTML = res.data.order.receiverssqaddress
        document.getElementById('receiverPhone').innerHTML = res.data.order.receiverPhone
        document.getElementById('receiverAddress').innerHTML = res.data.order.receiverAddress
        document.getElementById('distance').innerHTML = res.data.order.distance
        document.getElementById('amount').innerHTML = res.data.order.amount
        document.getElementById('paymentMethod').innerHTML = res.data.order.paymentMethod == 1 ? '预付' : '到付'
        document.getElementById('paymentStatus').innerHTML = res.data.order.paymentStatus == 1 ? '未付' : '已付'
        document.getElementById('qagencyId').innerHTML = res.data.taskpd.agencyname
        document.getElementById('taskType').innerHTML = res.data.taskpd.taskType == 1 ? '取件任务' : '派件任务'
        document.getElementById('qstatus').innerHTML = res.data.taskpd.status == 1 ? '待提货' : res.data.taskpd.status == 2 ? '在途中' : res.data.taskpd.status == 4 ? '已交付' : '已取消'
        document.getElementById('qcourier').innerHTML = res.data.taskpd.courier
        document.getElementById('qcphone').innerHTML = res.data.taskpd.cphone
        document.getElementById('qestimatedStartTime').innerHTML = res.data.taskpd.estimatedStartTime
        document.getElementById('qconfirmTime').innerHTML = res.data.taskpd.confirmTime
        document.getElementById('actualEndTime').innerHTML = res.data.taskpd.actualEndTime
        document.getElementById('pagencyId').innerHTML = res.data.taskpd.agencyname
        document.getElementById('pstatus').innerHTML = res.data.taskpd.status == 1 ? '待提货' : res.data.taskpd.status == 2 ? '在途中' : res.data.taskpd.status == 4 ? '已交付' : '已取消'
        document.getElementById('pcourier').innerHTML = res.data.taskpd.courier
        document.getElementById('pcphone').innerHTML = res.data.taskpd.cphone
        document.getElementById('pestimatedStartTime').innerHTML = res.data.taskpd.estimatedStartTime
        document.getElementById('pconfirmTime').innerHTML = res.data.taskpd.confirmTime
      })
      this.transportVisible = true
    },

  }
}
</script>
